@(movie: Movie, sessions: List[MovieSession], isDetail: Boolean)(implicit lang: Lang)

<div class="row movie">
	<div class="span7">
		<div class="row">
			<div class="span3">
				<h4>@movie.infos.get(0).name</h4>
			</div>
			<div class="span4" align="right">
				@if(movie.hot != 0){ <span class="label label-important">@Messages("movie.hot")(lang)</span>}
				@if(movie.release_date.compareTo(new Date()) > 0) {
				 <span class="label label-success">@Messages("movie.soon")(lang)</span>
				}
			</div>
		</div>
		<table class="table">
			<thead>
				<tr>
					<th width="25%">@Messages("movie.director")(lang)</th>
					<th width="25%">@Messages("movie.release")(lang)</th>
					<th width="25%">@Messages("movie.category")(lang)</th>
					<th width="25%">@Messages("movie.duration")(lang)</th>
				</tr>
			</thead>
			<tbody>
				<tr>
					<td>@if(movie.infos.get(0).director == null){ - }else{ @movie.infos.get(0).director }</td>
					<td>@movie.release_date.format("dd-MM-yyyy")</td>
					<td>@movie.category</td>
					<td>@if(movie.duration == null){ - }else{ @movie.duration }</td>
				</tr>
			</tbody>
		</table>
		@if(isDetail){
			<table class="table" style="margin-bottom:20px">
				<thead>
					<tr>
						<th>@Messages("movie.description")(lang) @if(movie.trailer !=null){# <a target="_blank" href="@movie.trailer">@Messages("movie.trailer")(lang)</a>}</th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td><p class="movie-description">@if(movie.infos.get(0).description == null){ - }else{ @movie.infos.get(0).description }</p></td>
					</tr>
				</tbody>
			</table>
		}
		<div class="well" style="padding-bottom:0">
			@if((movie.release_date.getTime() - new Date().getTime())/(1000 * 3600 * 24) > 7){
				<p class="unavailable" align="center">
					@Messages("movie.release.soon1")(lang) <span class="text-warning">@movie.release_date.format("dd MMM yyyy")<br /></span>
					@Messages("movie.release.soon2")(lang)
				</p>
			} else {
		        @sessions.groupBy(_.lang).map {
		            case (language, sessionList) => {
					<form class="form-search" action="@routes.MovieManager.session()" method="get">
						<label class="session" style="width:180px" for="house1">@Messages("movie.language",language)(lang)</label>
						<select id="house1" style="width:360px" name="id">
						@sessionList.map { session =>
							@if(session.showtime.compareTo(new Date()) > 0){
								<option value="@session.id">@session.showtime.format("dd/MM hh:mm aa (EEE)") | @Messages("movie.house",session.house.id)(lang) | $@session.price</option>
							}
						}
						</select>
					    <input type="hidden" name="lang" value="@lang.code">
						<button type="submit" class="btn">@Messages("movie.buy")(lang)</button>
					</form>
					}
				}
			}
		</div>
		@if(!isDetail){
			<div class="pull-right">
				<a href="@routes.MovieManager.detail(movie.id)?lang=@lang.code">@Messages("movie.detail")(lang)</a></li>
			</div>
		}
	</div>
	<div class="span2">
		<img alt="" src="@if(movie.poster == null){holder.js/170x250/poster}else{@routes.Assets.at(movie.poster)}" />
	</div>
</div>